package com.lin.setting.setting.desensitization;

import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.lin.setting.setting.desensitization.handler.CommonDesensitizationHandler;
import com.lin.setting.setting.desensitization.handler.DesensitizationHandler;
import com.lin.setting.setting.desensitization.serializer.DesensitizationSerializer;

import java.lang.annotation.*;

/**
 * @作者: 林江
 * @创建时间: 2024/5/3
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@JacksonAnnotationsInside // 是jackson中的元注解
@JsonSerialize(using = DesensitizationSerializer.class)
public @interface Desensitization {

    Class<? extends DesensitizationHandler> handler() default CommonDesensitizationHandler.class;
}
